Beverage preparation machine with capsule recognition

ABSTRACT

A machine ( 1 ) for preparing and dispensing a beverage ( 2 ) has: a capsule extraction unit ( 10 ) having a first part ( 11 ) and a second part ( 12 ) that are relatively movable between a distant position for inserting a capsule ( 3 ) and a close position for extracting such capsule ( 3 ); a control unit ( 40 ) for controlling the extraction unit ( 10 ) to extract such capsule ( 3 ); an outlet ( 20 ) for dispensing said beverage ( 2 ) formed by extracting such capsule ( 3 ) to a user-receptacle ( 4 ) located in a receptacle placing area; and a capsule recognition arrangement ( 30 ) connected to the control unit ( 40 ) for recognizing the colour of at least part of a capsule inserted in the machine ( 1 ).

FIELD OF THE INVENTION

The field of the invention pertains to beverage preparation machinesusing capsules of an ingredient of the beverage to be prepared. Thefield of the invention pertains in particular to beverage preparationmachines using capsules and configured to automatically recognize a typeof a capsule inserted in the machine in order for example to adapt thebeverage preparation parameters to the recognized capsule type.

For the purpose of the present description, a “beverage” is meant toinclude any human-consumable liquid substance, such as tea, coffee, hotor cold chocolate, milk, soup, baby food, etc. A “capsule” is meant toinclude any pre-portioned beverage ingredient, such as a flavouringingredient, within an enclosing packaging of any material, in particularan airtight packaging, e.g. plastic, aluminium, recyclable and/orbiodegradable packagings, and of any shape and structure, including softpods or rigid cartridges containing the ingredient. The capsule maycontain an amount of ingredient for preparing a single beverage portionor a plurality of beverage portions.

BACKGROUND ART

Certain beverage preparation machines use capsules containingingredients to be extracted or to be dissolved and/or ingredients thatare stored and dosed automatically in the machine or else are added atthe time of preparation of the drink. Some beverage machines possessfilling means that include a pump for liquid, usually water, which pumpsthe liquid from a source of water that is cold or indeed heated throughheating means, e.g. a thermoblock or the like.

Especially in the field of coffee preparation, machines have been widelydeveloped in which a capsule containing beverage ingredients is insertedin a brewing device.

Brewing devices have been developed to facilitate insertion of a “fresh”capsule and removal of the capsule upon use. Typically, the brewingdevices comprise two parts relatively movable from a configuration forinserting/removing a capsule to a configuration for brewing theingredient in the capsule.

The actuation of the movable part of the brewing device may be manual asdisclosed in WO 2009/043630, WO 01/15581, WO 02/43541, WO 2010/015427,WO 2010/128109, WO 2011/144719 and WO 2012/032019. Various handleconfigurations are disclosed in EP 1867260, WO 2005/004683, WO2007/135136, WO 2008/138710, WO 2009/074550, WO 2009/074553, WO2009/074555, WO 2009/074557, WO 2009/074559, WO 2010/037806, WO2011/042400, WO 2011/042401 and WO 2011/144720. Integrations of sucharrangements into beverage machines are disclosed in WO 2009/074550, WO2011/144719, EP2014195046, EP2014195048 and EP2014195067.

The actuation of the movable part of the brewing device may bemotorized. Such a system is for example disclosed in EP 1 767 129. Inthis case, the user does not have to provide any manual effort to openor close the brewing device. The brewing device has a capsule insertionpassage provided with a safety door assembled to the movable part of thebrewing device via a switch for detecting an undesired presence of afinger in the passage during closure and prevent injuries by squeezing.Alternative covers for a capsule insertion passage are disclosed WO2012/093107 and WO 2013/127906. Different motorization systems aredisclosed in WO 2012/025258, WO 2012/025259 and WO 2013/127476.

For allowing the user to interact with such machines, for providingoperation instructions to the machine or obtaining feed-back therefrom,various systems have been disclosed in the art, for instance asmentioned in the following references: AT 410 377, CH 682 798, DE 44 29353, DE 202 00 419, DE 20 2006 019 039, DE 2007 008 590, EP 1 448 084,EP 1 676 509, EP 08155851.2, FR 2 624 844, GB 2 397 510, U.S. Pat. Nos.4,377,049, 4,458,735, 4,554,419, 4,767,632, 4,954,697, 5,312,020,5,335,705, 5,372,061, 5,375,508, 5,645,230, 5,685,435, 5,731,981,5,836,236, 5,959,869, 6,182,555, 6,354,341, 6,759,072, US 2007/0157820,WO 97/25634, WO 99/50172, WO 2004/030435, WO 2004/030438, WO2006/063645, WO 2006/090183, WO 2007/003062, WO 2007/003990, WO2008/104751, WO 2008/138710, WO 2008/138820, WO 2010/003932, WO2011/144720 and WO 2012/032019.

To facilitate the operating of the machine, it is possible to identifyautomatically the capsule supplied to the machine and then handle andextract the capsule automatically, as for instance disclosed in WO2012/123440.

Document WO 2012/049426 A2 describes a system comprising a beveragepreparation machine connected over the Internet to a remote server. Acharacteristics of a capsule supplied to the machine, for example itscolour, is captured by the machine and sent to the remote server thatdetermines a type of the capsule.

There is still a need to improve the beverage dispensing with machinesthat reliably identify capsules automatically.

Document US 2012/123440 describes a barcode scanner with a colour imagesensor, which can use for example either RGB or YUV colour image signalsfrom the sensor in order to decode the barcode, in particular in orderto determine the barcode's edges in the captured image.

SUMMARY OF THE INVENTION

The invention relates to a machine for preparing a beverage. Thebeverage preparation machine can be an in-home or out of home machine.

The machine may be for the preparation of coffee, tea, chocolate, cacao,milk, soup, baby food, etc.

The beverage preparation typically includes the mixing of a plurality ofbeverage ingredients, e.g. water and milk powder, and/or the infusion ofa beverage ingredient, such as an infusion of ground coffee or tea withwater. One or more of such ingredients may be supplied in loose and/oragglomerate powder form and/or in liquid form, in particular in aconcentrate form. A carrier or diluents liquid, e.g. water, may be mixedwith such ingredient to form the beverage. Typically, a predeterminedamount of beverage is formed and dispensed on user-request, whichcorresponds to a portion (e.g. a serving). The volume of such portionmay be in the range of 25 to 200 ml and even up to 300 or 400 ml, e.g.the volume for filling a cup, depending on the type of beverage. Formedand dispensed beverages may be selected from ristrettos, espressos,lungos, cappuccinos, latte macchiato, cafè latte, americano coffees,teas, etc. In particular, a coffee machine may be configured fordispensing espressos, e.g. an adjustable volume of 20 to 60 ml perportion, and/or for dispensing lungos, e.g. a volume in the range of 70to 150 ml per portion.

The machine of the invention has a unit for extracting a beverageingredient capsule to form the beverage. The unit has a first part and asecond part that are relatively movable between a distant position forinserting and/or removing a capsule and a close position for securingand extracting such capsule. In the close position the first and secondparts typically delimit an extraction chamber.

The capsule can comprise a capsule body, e.g. a generally straight ortapered body. The capsule can have a circular peripheral annulus flange,e.g. a flexible or rigid flange, extending from a peripheral part, e.g.an edge or face, of the capsule body. The capsule may contain aflavoring ingredient for preparing tea, coffee, hot chocolate, coldchocolate, milk, soup or baby food.

At least one part of the first and second parts may delimit a cavity forreceiving the ingredient e.g. within a capsule, such as a taperedcavity, e.g. a conical or pyramidal cavity, or a straight cavity, e.g. acylindrical or trapezoidal cavity. Such cavity may extend along an axisthat is generally collinear with a direction of relative movement of thefirst and second parts. The extraction chamber is then delimited on oneside by such cavity.

The other part of these first and second parts may be delimited byanother cavity or include an extraction plate, such as a plate providedwith piercing elements for opening a flow-through face of the capsule ora non-intrusive plate for cooperating with a pre-opened or aself-opening flow-through face of the capsule.

Examples of extraction chambers are disclosed in in WO 2008/037642 andWO 2013/026843.

At least one of these parts can have a capsule opener e.g. one or morecapsule piercers.

The capsule can also include a self-opening mechanism. Self-openingcapsules are for instance disclosed in CH 605 293 and WO 03/059778.

When closed capsules are used, the first and second parts may include acapsule opener such as blades and/or a tearing tool, e.g. a plate with atearing profile, for instance as known from Nespresso™ machines or asdisclosed in EP 0 512 470, EP 2 068 684 and WO 2014/076041 and thereferences cited therein.

At least one of the parts may have an opening for an inflow of liquid tobe mixed with an ingredient contained in such capsule.

The machine includes a control unit for controlling the extracting unitto extract such capsule. The control unit can be powered by the mainse.g. via an electric cord.

The machine has an outlet for dispensing the beverage formed byextracting such capsule to a user-receptacle, such as a cup or a mug,located in a receptacle placing area.

A flavoured beverage may be prepared by circulating (by means of aliquid driver, e.g. a pump) a carrier liquid, such as water, into thecapsule to flavour the liquid by exposure to a flavouring ingredientheld in the capsule, e.g. along an extraction direction that may begenerally parallel to the direction of relative movement of the firstand second parts or to a longitudinal or central direction of theextraction.

For instance, the user receptacle can be placed on a receptacle supportto collect the beverage.

The receptacle support can be formed by an external placement support onwhich such machine is located.

The receptacle support may be formed by a support comprised by themachine, e.g. a movable or removable machine support.

The receptacle placing area can be associated with a machine recipientsupport for supporting such user-recipient under the outlet. The supportcan be: associated with a drip tray e.g. a drip tray supporting thesupport; and/or movable relative to the housing vertically under theoutlet and/or away from under the outlet for enabling a placement ofuser-recipients of different heights under the outlet. Examples ofsuitable recipient supports are disclosed in EP 0 549 887, EP 1 440 639,EP 1 731 065, EP 1 867 260, U.S. Pat. Nos. 5,161,455, 5,353,692, WO2009/074557, WO 2009/074559, WO 2009/135869, WO 2011/154492, WO2012/007313, WO 2013/186339, WO 2016/096705, WO 2016/096706 and WO2016/096707.

In embodiments, the outlet can be fixed to or formed by or mounted to ormounted in:

-   -   a machine head that has a deployed position in which the outlet        is located above the receptacle placing area and a collapsed        position in which the outlet is retracted within an external        machine main housing, such as a machine head driven inwards into        and outwards out of the main housing by at least one of the        first and second parts or by an actuator controlled by the        control unit; and/or    -   a movable beverage guide that has a beverage dispensing        configuration to dispense beverage to the receptacle placing        area and a beverage stop configuration to prevent dispensing of        beverage to the receptacle placing area, e.g. by draining        residual beverage from the guide over a guide edge to a waste        receptacle, such as a beverage guide driven between the        dispensing configuration and the stop configuration by at least        one of the first and second parts or by a (or the above) machine        head or by an actuator controlled by the control unit.

For instance, the machine is provided with a machine head as disclosedin WO 2017/037212 and in WO 2017/037215.

Examples of suitable waste receptacles for carrying out the presentinvention are disclosed in EP 1867260, WO 2009/074559, WO 2009/135869,WO 2010/128109, WO 2011/086087, WO 2011/086088, PCT/EP2017/050237 and WO2017/037212.

The directing fluid guide can be entirely confined in the main bodyand/or the machine head.

Details of directing fluid guides that are suitable or adaptable forcarrying out the present invention are disclosed in WO 2006/050769, WO2012/072758, WO 2013/127907, WO 2016/083488 and WO 2017/037212.

The extraction unit can include a capsule feeder for feeding a capsuleto the extraction chamber, the feeder having a capsule dispenser with arelease configuration for releasing such capsule from the feeder towardsthe extraction chamber and a retain configuration for retaining suchcapsule away from the extraction chamber.

The capsule dispenser can be formed by a mechanical and/or magneticcapsule gate such as a capsule holder e.g. having a shape complementaryto and matching at least part of an outer shape of such capsule.

The capsule holder may have a capsule gate that is movable, such aspivotable and/or translatable, between a position obstructing a transfertowards the extraction chamber and a position clearing the transfertowards the extraction chamber.

The capsule holder may have an actuator for passing from the retainconfiguration to the release configuration and vice versa, such as anactuator controlled by the control unit.

Immediately after releasing a capsule towards the extraction, thecapsule dispenser may be passed from the release configuration to theretain configuration so that access towards the extraction chamber isonly provided when needed to release a capsule.

Details of suitable capsule dispensers are disclosed in WO 2012/126971,WO 2014/056641, WO 2014/056642 and WO 2015/086371.

The capsule feeder may include a passage for guiding such capsule to theextraction chamber into a predetermined capsule orientation for itsentry into the extraction chamber such as a passage associated withcapsule immobilizer for immobilizing such capsule between the first andsecond parts in their distant position prior to relatively moving theminto their close position.

The interaction between the first and second parts (and optionally thecapsule guiding passage) and an ingredient capsule may be of the typedisclosed in WO 2005/004683, WO 2007/135135, WO 2007/135136, WO2008/037642 and WO 2013/026856.

The control unit may control the capsule dispenser to release suchcapsule from the feeder when the first and second parts are in thedistant position or moving towards the distant position, for an entry ofsuch capsule into the extraction chamber when the first and second partsare brought back into their close position.

The control unit may control the capsule dispenser to retain suchcapsule at the feeder and away from the extraction chamber when thefirst and second parts are:

-   -   in the close position or relatively moving thereto; or    -   in the distant position and about to relatively move to the        close position so as to leave insufficient time for such        capsule, if it were released from the dispenser, to be received        into the extraction chamber prior to the first and second parts        reaching the close position.

The capsule feeder may include or be associated with a capsule sensorconnected to the control unit, the control unit being configured tobring or maintain the capsule dispenser in its retain configuration whenthe capsule sensor senses no such capsule on or at the capsuledispenser. Examples of capsule sensors are for example disclosed in WO2012/123440, WO 2014/147128, WO 2015/173285, WO 2015/173289, WO2015/173292, WO 2016/005352 and WO 2016/005417.

The control unit can be configured to control the actuator so that thefirst and second parts are moved by the actuator: from the closeposition into the distant position and from the distant position intothe close position after a predetermined period of time starting forexample from a beverage preparation triggering event such as for examplecapsule detection, capsule recognition, user actuation of the machine'suser interface, etc., or a combination thereof, for instance apredetermined period of time in the range of 3 to 15 sec, such as 5 to12 sec, e.g. 7 to 10 sec.

Examples of such parts that are relatively moved by an actuator (e.g. amotor) are disclosed in EP 1767129, WO 2012/025258, WO 2012/025259, WO2013/127476 and WO 2014/056641.

For instance, the first part and the second part are relatively movablegenerally along a straight axis by the actuator from the close to thedistant positions and/or vice versa.

The machine may include a liquid supplier for supplying liquid, e.g.water, into the extraction chamber, the liquid supplier being connectedto and controlled by the control unit to supply such liquid into theextraction chamber and to interrupt such supply, automatically and/ormanually via a user-interface connected to the control unit and/or whena removal of such receptacle is detected by the detecting arrangement.For instance, the liquid supplier includes one or more of: a source ofsaid liquid, such as a liquid tank or a liquid connector for connectionto an external liquid provider; one or more liquid tubes for guidingsuch liquid to the extraction chamber; a liquid driver, such as a pumpe.g. a solenoid pump (reciprocating piston pump) or a peristaltic pumpor a diaphragm pump, for driving such liquid into extraction chamber;and a thermal conditioner, e.g. a heater and/or a cooler, such as aninline thermal conditioner, e.g. an inline flow conditioner, forthermally conditioning such liquid.

Examples of suitable liquid sources, e.g. tanks or connectors, aredisclosed in WO 2016/005349, EP2015194020.2, PCT/EP2017/050237 and thereferences cited therein.

The thermal conditioner may be a boiler or a thermoblock or an on demandheater (ODH), for instance an ODH type disclosed in EP 1 253 844, EP 1380 243 and EP 1 809 151.

Examples of pumps and their incorporation into beverage machines aredisclosed in WO 2009/150030, WO 2010/108700, WO 2011/107574 and WO2013/098173.

The control unit may be configured to control the liquid supplier tosupply automatically the liquid into the extraction chamber when:

-   -   the first and second parts have reached their close position        with the capsule housed in the extraction chamber upon moving        the parts from the distant to the close positions so as to        combine said liquid with an ingredient contained in the capsule        and form the beverage for dispensing via the outlet, optionally        after sensing with a (or the above) capsule sensor a supply of        such capsule to the unit; and/or    -   the first and second parts have reached their close position        without any capsule housed in the extraction chamber so as to        rinse or clean at least part of the unit and optionally the        outlet, the liquid supplier being for instance configured to        supply the liquid at a rinsing or cleaning temperature that is        different to the temperature of such liquid for forming a        beverage, e.g. by brewing.

In a particular embodiment, it is also contemplated to deliver cold orcooled beverages.

The control unit can be configured to control the liquid supplier not tosupply automatically the liquid into the extraction chamber when thefirst and second parts have reached their close position without any(for instance detected or recognised) capsule housed in the extractionchamber. For instance, the control unit is configured to control theliquid supplier to supply the liquid into the extraction chamber uponsensing a corresponding manual user-input on a user-interface connectedto the control unit.

The control unit may have an end-of-extraction management program whichis run automatically when the liquid supply is interrupted (e.g. when apredetermined extraction process is over or is detected as faulty) to:

-   -   immediately relatively move the first and second parts into        their distant position so as to remove any capsule from        inbetween the first and second parts; or    -   to maintain the first and second parts in the close position        during a predetermined period of time, e.g. in the range of 1 to        5 sec such as 2 to 3 sec, for allowing a manual request, e.g.        via a user-interface connected to the control unit, to supply        via the liquid supplier an additional amount of liquid into the        extraction chamber and, in the absence of such manual request        during the predetermined period of time, to relatively move the        first and second parts into their distant position so as to        remove any capsule from inbetween the first and second parts,        for instance to remove such capsule into a used-capsule        collector formed by a (or the above) waste receptacle.

For instance, prior to moving the first and second parts into theirclose position, the parts may remain into their distant position for apredetermined period of time, such as a period of time in the range of 1to 6 sec. e.g. 2 to 4 sec, for allowing an insertion of a new capsuleinbetween the first and second parts prior to relatively moving theminto their close position with the new capsule housed in the extractionchamber for an extraction of the new capsule.

Hence, a user can request the dispensing of two (or more) portions ofbeverages (e.g. a double expresso) into the same user-recipient.

According to the invention, the machine comprises:

-   -   an extraction unit for extracting a beverage ingredient capsule        to form a beverage, e.g. a unit having a first part and a second        part that are relatively movable between a distant position for        inserting and/or removing a capsule and a close position, such        as a close position in which the first and second parts delimit        an extraction chamber, for securing and extracting such capsule,        optionally at least one of the parts has a capsule opener e.g.        one or more capsule piercers and/or at least one of the parts        has an opening for an inflow of liquid to be mixed with an        ingredient contained in such capsule;    -   a control unit for controlling the extraction unit to extract        such capsule, such as a control unit powered by the mains e.g.        via an electric cord;    -   an outlet for dispensing the beverage formed by extracting such        capsule to a user-receptacle, such as a cup or a mug, located in        a receptacle placing area, such as on a receptacle support, e.g.        an external placement support on which such machine is located        or a machine support, e.g. a movable or removable machine        support, to collect the beverage,    -   a colour recognition module for recognizing a colour of a        capsule inserted in the machine, the colour recognition module        comprising a colour sensor for sensing a sample colour of at        least part of the surface of such capsule;

wherein the colour recognition module is configured to compare thesample colour to at least one reference colour by:

-   -   computing a colour distance between a sample colour vector of        the sample colour and a reference colour vector of the at least        one reference colour,    -   computing a chromaticity distance between a sample chromaticity        vector of the sample colour and a reference chromaticity vector        of the at least one reference colour,    -   computing a score with the colour distance and the chromaticity        distance to determine a match between the colour sample and the        at least one reference colour.

Using both the colour distance and the chromaticity distance whendetermining a match between the colour sample and the at least onereference colour allows achieving a more reliable and robust colourrecognition over a large spectrum of reference colours, for brightcolours as well as for dark colours.

The colour recognition module is preferably configured to compute thesample chromaticity vector from the sample colour vector. The samplecolour vector and the reference colour vector are preferablythree-dimensional RGB vectors.

In preferred embodiments, the colour recognition module is configured tocompute the score by computing a luminosity level of the sample colourand weighting the colour distance and the chromaticity distance byrespective balance factors determined on the basis of the luminositylevel.

The machine preferably comprises a capsule recognition position on whichthe capsule is located, typically held by retaining means, while itscolour is being sampled by the colour recognition module. The capsulerecognition position preferably comprises retaining means for holdingthe capsule in front of the colour recognition module, in particular infront of its colour sensor, in order to allow sampling the colour of thecapsule by the colour recognition module.

In preferred embodiments, the colour recognition module is configured tocompute the colour distance by computing an Euclidian distance betweenthe sample colour vector and the reference colour vector; and to computethe chromaticity distance by computing an Euclidian distance between thesample chromaticity vector and the reference chromaticity vector.

The colour recognition module is preferably configured to compare thesample colour to a plurality of reference colours by computing aplurality of scores for determining a match between the sample colourand each reference colour of the plurality of reference colours.

The colour recognition module is preferably configured to recognize thecapsule based on the reference colour of the plurality of referencecolours that best matches the sample colour.

The colour recognition module is for example configured to determine amatch between the sample colour and the reference colour if the score isbelow or equal to a threshold value, and to determine no match betweenthe sample colour and the reference colour is the score is above thethreshold value.

The machine may further comprise a capsule detector for detecting thepresence of a capsule located on or approaching a capsule feeder of themachine and triggering colour recognition by the colour recognitionmodule.

The machine may further comprise a material detector for recognising amaterial of a capsule located on or approaching a capsule feeder of themachine, the information from the material detector being for exampleused in conjunction with the output of the colour recognition module asan additional criterion for recognizing the type of the capsule.

The invention also relates to a combination of a machine as describedabove and a capsule, e.g. such capsule being in the machine's extractionchamber or such capsule being handled by a capsule feeder of themachine.

Another aspect of the invention relates to a method of preparing anddispensing a beverage from a capsule in a machine as defined above,comprising: inserting a capsule in the machine; sensing a sample colourof at least part of the surface of the capsule; comparing the samplecolour to at least one reference colour by:

-   -   computing a colour distance between a sample colour vector of        the sample colour and a reference colour vector of the at least        one reference colour,    -   computing a chromaticity distance between a sample chromaticity        vector of the sample colour and a reference chromaticity vector        of the at least one reference colour,    -   computing a score with the colour distance and the chromaticity        distance to determine a match between the colour sample and the        at least one reference colour;        recognising a type of the capsule based on the result of the        comparison; relatively moving the first and second parts into        their distant position; supplying the capsule to the extracting        unit; relatively moving the first and second parts into their        close position to position the capsule in the extraction        chamber; extracting the capsule in the extraction chamber        applying extraction parameters determined on the basis of the        recognised type of the capsule to prepare a beverage; and        dispensing the prepared beverage via the outlet.

A further aspect of the invention relates to a use of a capsule for: amachine as defined above; forming a combination as defined above; orcarrying out a method as defined above; whereby a type of the capsule isrecognised by:

-   -   sensing a sample colour of at least part of the surface of the        capsule;    -   comparing the sample colour to at least one reference colour by:        -   computing a colour distance between a sample colour vector            of the sample colour and a reference colour vector of the at            least one reference colour,        -   computing a chromaticity distance between a sample            chromaticity vector of the sample colour and a reference            chromaticity vector of the at least one reference colour,        -   computing a score with the colour distance and the            chromaticity distance to determine a match between the            colour sample and the at least one reference colour capsule;            extracting the capsule in the extraction chamber to prepare            a beverage applying extraction parameters determined on the            basis of the recognised type of the capsule.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be described with reference to the schematicdrawings, wherein:

FIG. 1 is a perspective view of a machine according to the invention;

FIG. 2 is a cross-sectional view of the machine shown in FIG. 1 with acapsule to be recognized and fed towards the machine's extractionchamber, and with a user-receptacle;

FIG. 3 illustrates the machine and capsule shown in FIG. 2 with thefirst and second parts that have been brought from their relativelyclose position into their relatively distant position;

FIG. 4 is a cross-sectional view of the machine and capsule of FIG. 3,the capsule having been released towards the extraction chamber; and

FIG. 5 illustrates the machine and capsule of FIG. 4, the releasedcapsule having been immobilized between the first and second parts intheir distant position;

FIG. 6 illustrates the machine and capsule of FIG. 5, the first andsecond parts having being relatively moved into their close position toform the extraction chamber in which the capsule is housed, the liquidsupplier supplying liquid into the extraction chamber to mix with aflavouring ingredient in the capsule and dispense it to theuser-receptacle via the outlet;

FIG. 7 shows the machine and capsule of FIG. 6 after extraction of thecapsule and after relatively moving the first and second parts intotheir distant position, the capsule being ejected into a waste collectorand no new capsule being fed towards the machine's extraction chamber;

FIG. 8 illustrates a variation of the machine and capsule of FIG. 7 inwhich a new capsule is fed towards the machine's extraction chamber atthe ejection of an extracted capsule;

FIG. 9 is a cross-sectional view of a colour recognition moduleaccording to the invention and a capsule being recognised;

FIG. 10 is a cross-sectional view of the colour recognition module ofFIG. 9.

DETAILED DESCRIPTION

FIGS. 1 to 8 illustrate an exemplary embodiment of a beverage machine 1according to the invention for preparing and dispensing a beverage 2,such as tea, coffee, hot chocolate, cold chocolate, milk, soup or babyfood. The ingredient may be supplied in the form of an ingredientcapsule 3, e.g. of the type described above under the header “Field ofthe Invention”.

The sequence from FIGS. 1 to 8 illustrates a beverage preparationsequence in machine 1 from the supply of an ingredient capsule 3 to theremoval of capsule 3 upon beverage preparation.

Machine 1 includes an extraction unit 10 for extracting beverageingredient capsule 3 to form beverage 2. Extraction unit 10 for examplehas a first part 11 and a second part 12 that are relatively movablebetween a distant position for inserting and/or removing capsule 3 and aclose position, such as a close position in which first and second parts11,12 delimit an extraction chamber 100, for securing and extractingsuch capsule 3. For instance, at least one of parts 11,12 has a capsuleopener e.g. one or more capsule piercers and/or at least one of saidparts 11,12 has an opening for an inflow of liquid to be mixed with aningredient contained in such capsule 3.

Machine 1 includes a control unit 40, schematically illustrated in FIGS.2-8, for controlling extraction unit 10 to extract capsule 3. Controlunit 40 may be powered by the mains, e.g. via an electric cord 45, or bya DC source, e.g. battery such as a car battery or portable battery ormachine battery.

Machine 1 has an outlet 20 for dispensing beverage 2 formed byextracting such capsule 3 to a user-receptacle 4, such as a cup or amug, located in a receptacle placing area to collect beverage 2. Sucharea may be on a receptacle support 5,6 e.g. an external placementsupport 5 on which such machine 1 is located or a machine support 6 e.g.a movable or removable machine support 6, e.g. a machine support 6 thatis located on or above an external placement support 5.

In embodiments, outlet 20 is for example fixed to or formed by ormounted to or mounted in a machine head 21 that has a deployed positionin which outlet 20 is located above the receptacle placing area and acollapsed position in which outlet 20 is retracted within an externalmachine main housing 14. Machine head 21 may be driven inwards into andoutwards out of the housing 14 by at least one of the first and secondparts 11,12 or by an actuator controlled by the control unit.

Outlet 20 can be fixed to or formed by or mounted to or mounted in amovable beverage guide 22 that has a beverage dispensing configurationillustrated for example on FIG. 6 to dispense beverage 2 to thereceptacle placing area and a beverage stop configuration visible forexample in FIG. 2 to prevent dispensing of beverage to the receptacleplacing area, e.g. by draining residual beverage from guide 22 over aguide edge 23 to a waste receptacle 60. Guide 22 can be driven betweenthe dispensing configuration and the stop configuration by at least oneof first and second parts 11,12 or by a (or the above) machine head 21or by an actuator controlled by the control unit.

Extraction unit 10 includes an actuator 13 configured to relatively movefirst and second parts 11,12 between their relatively distant and closepositions. Actuator 13 is connected to control unit 40 and controlledthereby to relatively move first and second parts 11,12.

Control unit 40 is connected to an input device for initiating and/orcontrolling the extraction unit 10. According to the invention, theinput device comprises for example a user interface 41 and a colourrecognition module 8 to recognise a type of a capsule 3 ready to beinserted into the extraction unit 10. The input device optionallyfurther comprises a capsule sensor for sensing the presence of a capsule3 located in and/or approaching the extraction unit 10.

Extraction unit 10 may include a capsule feeder 15 for feeding a capsule3 to extraction chamber 100. The capsule feeder 15 can have a capsuledispenser 151 with a release configuration for releasing the capsule 3from the capsule feeder 15 towards the extraction chamber 100 and aretain configuration for retaining the capsule 3 away from theextraction chamber 100. The capsule feeder 15 can include a mechanicaland/or magnetic capsule gate such as a capsule holder 151 e.g. matchingat least part of an outer shape of the capsule 3.

The capsule feeder 15 can have a passage 152 (FIG. 4) for guiding thecapsule 3 to the extraction chamber 100 into a predetermined capsuleorientation for its entry into the extraction chamber 100, such as apassage 152 associated with a capsule immobilizer for immobilizing thecapsule 3 between the first and second parts 11,12 in their distantposition (FIG. 5) prior to moving them relatively to each other intotheir close position (FIG. 6).

The control unit 40 may control the capsule dispenser 151 to release thecapsule 3 from the feeder 15 when the first and second parts 11,12 arein the distant position (FIG. 4) or when they are moving towards thedistant position, for an entry of the capsule 3 into the extractionchamber 100 when the first and second parts 11,12 are brought back intotheir close position (FIG. 6).

Control unit 40 may control capsule dispenser 151 to retain the capsule3 at the feeder 15 and away from the extraction chamber 100 when thefirst and second parts 11,12 are: in the close position or movingthereto (FIG. 2); or in the distant position and about to move to theclose position so as to leave insufficient time for the capsule 3, if itwere released from the dispenser 151, to be received into the extractionchamber 100 prior to the first and second parts 11,12 reaching the closeposition.

Optionally, the capsule feeder 15 may include or be associated with acapsule sensor connected to the control unit 40, which is for exampleconfigured to bring or maintain the capsule dispenser 151 in its retainconfiguration when the capsule sensor senses no capsule 3 on or at thecapsule dispenser 151 (FIG. 7).

The control unit 40 may be configured to control the actuator 13 so thatthe first and second parts 11,12 are moved by the actuator 13 from thedistant position into the close position after a predetermined period oftime has lapsed starting from a beverage preparation triggering eventsuch as for example capsule detection, capsule recognition, useractuation of the machine's user interface, or reaching the distantposition, or a combination thereof (FIGS. 2 to 6); For instance, thepredetermined period of time is in the range of 3 to 15 sec, such as 5to 12 sec, e.g. 7 to 10 sec.

The extraction unit 10 may include a liquid supplier 50,51,52,53,54 forsupplying liquid, e.g. water, into the extraction chamber 100 (FIG. 2).The liquid supplier 50,51,52,53,54 can be connected to and controlled bythe control unit 40 to supply liquid into the extraction chamber 100 andto interrupt such supply, for example automatically and/or manually viaa user-interface 41 connected to the control unit 40.

For instance, the liquid supplier 50,51,52,53,54 includes one or moreof: a source of liquid 50, such as a liquid tank or a liquid connectorfor connection to an external liquid provider; one or more liquid tubes51,52 for guiding the liquid to the extraction chamber 100; a liquiddriver 53, such as a pump, for driving the liquid into the extractionchamber 100; and a thermal conditioner 54, e.g. a heater and/or acooler, such as an inline thermal conditioner, e.g. an inline flowconditioner, for thermally conditioning the liquid.

The control unit 40 can be configured to control the liquid supplier50,51,52,53,54 to supply automatically the liquid into the extractionchamber 100 when the first and second parts 11,12 have reached theirclose position with the capsule 3 housed in the extraction chamber 100upon moving the first and second parts 11,12 from the distant to theclose positions so as to combine the liquid with an ingredient containedin the capsule 3 and form the beverage 2 for dispensing via the outlet20. See FIG. 6.

The control unit 40 may be configured to control the liquid supplier50,51,52,53,54 to supply automatically the liquid into the extractionchamber 100 when the first and second parts 11,12 have reached theirclose position without any capsule housed in the extraction chamber 100so as to rinse or clean at least part of the extraction unit 10 andoptionally the outlet 20. For instance, the liquid supplier50,51,52,53,54 is configured to supply liquid at a rinsing or cleaningtemperature that is different to the temperature of such liquid forforming a beverage, e.g. by brewing.

In a particular embodiment, it is also contemplated to deliver cold orcooled beverages.

The control unit 40 can be configured to control the liquid supplier50,51,52,53,54 not to supply automatically liquid into the extractionchamber 100 when the first and second parts 11,12 have reached theirclose position without any capsule housed in the extraction chamber 100.For instance, the control unit 40 is configured to control the liquidsupplier 50,51,52,53,54 to supply the liquid into the extraction chamber100 upon sensing a corresponding manual user-input on a user-interface41 connected to control unit 40.

According to the invention, the machine 1 includes a colour recognitionmodule 8 connected to the control unit 40 and configured to recognize atype of a capsule 3 fed or ready to be fed to the extraction chamber100. As explained in more details further below, the colour recognitionmodule 8 recognizes a type of a capsule 3 by recognizing a colour of atleast part of the surface of the capsule 3. The control unit 40 ispreferably configured to control the liquid supplier 50,51,52,53,54according to a liquid supply program associated with the type, such as aliquid supply program with one or more adjusted supplied liquidparameters selected from a liquid temperature, flow, pressure and volumethat is/are constant or variable during an extraction of the recognisedcapsule 3. For instance, the type can be selected from a plurality ofcapsule types extractible in extraction chamber 100 and each associatedwith a reference colour stored in an internal or external data storagemeans connected or connectable with the control unit 40.

The colour recognition module 8 is preferably positioned in the vicinityof the capsule feeder 15, and more particularly, near, around and/or inthe capsule dispenser 151.

The control unit 40 may have an end-of-extraction management programwhich is run automatically when the liquid supply is interrupted (e.g.when a predetermined extraction process is over or is detected asfaulty) to:

-   -   immediately relatively move first and second parts 11,12 into        their distant position so as to remove any capsule 3 from        inbetween the first and second parts 11,12; or    -   to maintain the first and second parts 11,12 in the close        position during a predetermined period of time, e.g. in the        range of 1 to 5 sec such as 2 to 3 sec, for allowing a manual        request, e.g. via a user-interface 41 connected to control unit        40, to supply via the liquid supplier 50,51,52,53,54 an        additional amount of liquid into extraction chamber 100 and, in        the absence of such manual request during said predetermined        period of time, to relatively move the first and second parts        11,12 into their distant position so as to remove any capsule 3        from inbetween the first and second parts 11,12, for instance to        remove such capsule 3 into a used-capsule collector 60 formed by        a (or the above) waste receptacle 60.

Optionally, prior to moving the first and second parts 11,12 into theirclose position, the first and second parts 11,12 may remain into theirdistant position for a predetermined period of time, such as a period oftime in the range of 1 to 6 sec. e.g. 2 to 4 sec, for allowing aninsertion of a new capsule 3 inbetween the first and second parts 11,12prior to relatively moving them into their close position with newcapsule 3 housed in the extraction chamber 100 for an extraction of thenew capsule 3.

During use, the following steps can be carried out (FIGS. 1 to 6):

-   -   placing a receptacle 4 in the receptacle placing area;    -   placing a capsule 3 on the capsule feeder 15;    -   recognizing a type of the capsule 3 by the colour recognition        module 8;    -   relatively moving the first and second parts 11,12 into their        distant position automatically, semi-automatically or manually;    -   supplying the capsule 3 to the extraction unit 10;    -   relatively moving the first and second parts 11,12 into their        close position to position the capsule 3 in the extraction        chamber 100;    -   extracting the capsule 3 in the extraction chamber 100 applying        extraction parameters determined on the basis of the recognised        type of the capsule 3 to prepare a beverage 2; and    -   dispensing the prepared beverage 2 via the outlet 20 to the        receptacle 4.

According to the invention, the recognition module 8 is configured todetermine a type of a capsule 3 inserted in or placed on the machine 1,for example of a capsule 3 placed on the capsule feeder 15 by a user, byrecognising a colour of at least part of the capsule 3.

Machine 1 typically allows extracting capsules of different types inorder to prepare different beverages and/or different beverage styles.The different types of capsules extractible in the extraction chamber100 for example correspond to different ingredients contained thereinand/or different ingredient conditioning. In embodiments, each type ofcapsule corresponds to a particular type of coffee, which differs fromthe coffee contained in capsules of other types for example, but notexclusively, in one or more of its origin, its roasting degree, itsgrounding level, its quantity contained in the capsule and/or itscaffeine content. Alternatively or in combination thereof, differenttypes of capsules extractible in the machine 1 correspond to ingredientsfor the preparation of different beverages, such as for example coffee,milk, soup, baby milk, tea, cold beverages, etc.

Preferably, each type of capsule is associated to a specific referencecolour of at least part of the capsule 3, thereby allowing for example auser visually differentiating capsules of different types. Datarepresentative of such reference colours, for example reference colourvectors, typically one reference vector per reference colour, ispreferably stored in an internal or external data storage meansconnected or connectable with control unit 40 and/or with recognitionmodule 8.

The machine 1 may be configured to extract each capsule 3 usingpreparation parameters specific to the particular type of the capsule 3.The preparation parameters for example include one or more of: a carrierliquid temperature, a carrier liquid volume, an extraction time, acarrier liquid pressure, a carrier liquid type, a number of successivepreparation phases, etc. The preparation parameters for use with eachtype of capsule extractible in the machine 1 are preferably stored in aninternal or external data storage means connected or connectable withthe control unit 40 and/or with the colour recognition module 8. Theappropriate preparation parameters are selected on the basis of the typeof the capsule 3 determined by the colour recognition module 8 and usedby the control unit 40 for controlling the extraction of the recognisedcapsule 3.

The machine 1 may also be configured to store and/or to transmit to anexternal server information about the type of each capsule extracted inthe machine, in order for example to monitor the capsule consumption atthe machine 1.

With reference to FIG. 9, the colour recognition module 8 comprises asource of light 82, for example a white LED or any other appropriatesource of light, preferably with known and definite spectrum, and acolour sensor 81, for example a RGB sensor. The colour recognitionmodule 8 further preferably comprises a controller 83, for example butnot exclusively an ASIC or a programmable microcontroller, forcontrolling the source of light 82 and the colour sensor 81, for examplefor switching the source of light 82 on and off and/or for receiving andhandling the signals from the colour sensor 81. The source of light 82,the colour sensor 81 and the controller 83 are preferably attached, forexample soldered, to an electronic board 80, typically a PCB, providingthem in a known manner with the necessary power and data connectionsand/or interconnections. The controller 83 is preferably connected toand controlled by the control unit 40 of the machine 1.

Preferably, the colour recognition module 8 further comprises a lightguide 89 for guiding light emitted by the source of light 82 towards atarget location and for limiting the light received by the colour sensor81 preferably to the light reflected by an object located at the targetlocation in order to avoid sensing parasitic light, for exampleenvironmental light. The light guide 89 is for example in the form of acover associated with, for example attached to, the electronic board 80and at least partly covering the source of light 82 and/or the coloursensor 81. The cover comprises for example openings or other guidingmeans for guiding the light to and from the target location. In theillustrated example, cavities are formed in the cover above each of thecolour sensor 81 and the source of light 82, which are open on theirupper side. The inner walls of the cavities are preferably shaped inorder to avoid reflections within the cavities that may lead to faultylightning of the object located at the target location and/or faultycolour sensing of the light reflected by said object.

Optionally, the machine 1 comprises a capsule detector 84 for detectinga capsule located on or approaching the capsule feeder. The capsuledetector 84 is for example comprised in the colour recognition module 8,preferably attached to, for example soldered on, the electronic board80. Other dispositions of the capsule detector are however possiblewithin the frame of the invention. The capsule detector 84 may be of anyappropriate type, for example a presence and/or movement detector, suchas an infrared (IR) detector, an inductive and/or resistive detector, amechanical switching element, etc. The capsule detector 84 is forexample controlled by the controller 83 of the colour recognition module8 or directly controlled by the control unit of the machine.

In embodiments, the machine 1 further comprises a material detector,which is not represented on the figures, for detecting a material of acapsule located on or approaching the capsule feeder. The materialdetector is for example an inductor or a resistive element recognizing ametallic body of a capsule. The output of the material detector is forexample sent to the controller 83 and used in conjunction with theoutput of the colour recognition module 8 as an additional criterion fordetermining a type of the capsule located on or approaching the capsulefeeder. The material detector may be an additional detector in additionto the optional capsule detector 84, or a single detector, for examplean inductive, capacitive or resistive detector, may be used as capsuledetector and material detector.

FIG. 10 shows a capsule 3 placed in the capsule feeder 15 of the machinebefore its introduction into the machine's extraction chamber. Thecolour recognition module 8 is preferably associated with or part of thecapsule feeder 15. The colour recognition module 8 is for exampleattached to the capsule holder 151 and positioned such that the lightemitted by the source of light 82 is directed towards the surface of acapsule 3 placed in the capsule feeder 15, and such that at least partof the light of the source of light 82 that is reflected by the surfaceof the capsule 3 is directed towards the colour sensor 81.

In the illustrated example, the colour recognition module 8 is attachedunder the capsule receiving surface of the capsule holder 151. A windowis formed in the preferably opaque material of the capsule holder 151,which cooperates with the openings of the light guide 89 of the colourrecognition module 8 for allowing light emitted by the source of light82 to reach at least a part of the surface of a capsule 3 placed on thecapsule holder 151, and for allowing light reflected by said surface tobe received by the colour sensor 81.

The window formed in the preferably opaque material of the capsuleholder 151 is preferably covered by a translucent material in order toprotect the elements of the colour recognition module 8, in particularthe colour sensor 81, the source of light 82 and the optional capsuledetector 84, from external mechanical aggressions such as, but notexclusively, dirt, objects inserted in the window of the capsule holder151, etc. In embodiments, the capsule receiving surface of the capsuleholder 151 is covered with a semi-transparent skin 153 made for exampleof a rigid semi-transparent plastic material and shaped, for examplemoulded, to match the shape of the surface of the capsule 3 in order toprovide a stable position to the capsule 3 when correctly placed on thecapsule holder 151. In embodiments, the cover 153 is furthermore lightlytinted in order to at least partly hide the colour recognition module 8and its elements to the view of a user of the machine while notsignificantly impairing colour sensing of the capsule 3 by the colourrecognition module 8.

In embodiments, when a capsule 3 is approached to and/or placed in thecapsule feeder 15, the optional capsule detector 84 detects the presenceof the capsule 3 and sends a corresponding signal to the controller 83and/or to the machine's control unit, which activate the source of light82 to illuminate at least part of the surface of the capsule 3 locatedon the capsule holder 151. The colour sensor 81 is in turn activated tosense a sample colour of the capsule 3 from the light reflected by saidsurface and received by the colour sensor 81. The sample colour is thencompared with one or more known reference colours, for example by thecontroller 83 of the colour recognition module 8 and/or by the machine'scontrol unit, in order to determine a match between said sample colourand at least one reference colour. Alternatively, in particular if themachine does not comprise any capsule detector, the recognition module8, in particular the source of light 82 and the colour sensor 81, isactivated by a user actuation for example of the machine's userinterface, for example by the activation of a beverage preparationcommand.

Preferably, the colour sensor 81 is an RGB (Red Green Blue) sensor thatprovides three raw values Rr, Gr, Br representing the primary colourrepartition in incoming light received by photodiodes of the sensor.These three raw values are typically the result of the integration overa fixed period of time of the received light in the correspondingfrequency ranges. The integration time is for example set to 200 ms. Theoutput values Rr, Gr, Br are for example represented on 19 bits and cantake a value between 0 and 524287.

FIG. 11 schematically illustrates an embodiment of the colourrecognition method of the invention.

In a first step 71, the colour sensor 81 senses as explained above asample colour of at least part of the surface of a capsule located inthe machine's capsule feeder and generates a raw sample colour vector ofthree raw values Rr, Gr, Br representative of the sensed sample colour.

In a next step 72, the raw sample colour vector is corrected with one ormore calibration vectors specific to the individual machine, inparticular to the actual characteristics of its colour recognitionmodule, and stored in a memory storage of or accessible to the colourrecognition module, for example in a memory storage 84 of or accessibleto the controller 83.

The calibration vectors for example comprise a black balance calibrationvector and a white balance calibration vector that are generated foreach machine preferably at the end of the machine production line, oncethe machine, or at least the capsule feeder with the colour recognitionmodule, is fully functional. In order to generate the calibrationvectors, a reference colour sample, for example a reference blacksample, is placed on the capsule feeder and its colour is sensed by thecolour sensor 81 that generates a calibration vector, for example ablack balance calibration vector Bref, with the corresponding three rawvalues generated by the sensor as a result of the sensing step, forexample Bref_(red), Bref_(green) and Bref_(red). The same procedure isthen preferably repeated with another reference colour sample, forexample with a reference white sample, in order to generate a secondcalibration vector, for example a white balance calibration vector Wref(Wref_(red),Wref_(green),Wref_(red)). The calibration vectors are thenstored in the memory storage 84.

Correcting the raw sample colour vector with machine specificcalibration vectors, in particular with a black balance calibrationvector and a white balance calibration vector, generated as explainedabove allows compensating potentially large variations in colour sensingbetween individual machines, due for example to variations in thecharacteristics of each machine's source of light, colour sensor, skintransparency, light guide efficiency, etc. Correcting the raw samplecolour vector from these machine specific variations allows achievingreliable and consistent capsule colour recognition across all machines.

In embodiments, the correction calculation is the calculation of thenormalised distance of each primary colour raw value of the raw samplecolour vector between the corresponding calibration values of the twocalibration vectors, with an output range of for example 0 to 1000. Thecorrected sample colour vector R, G, B is thus for example computedaccording to the following formula:

$R = {\frac{\left( {{Rr} - {Bref}_{red}} \right)}{\left( {{Wref}_{red} - {Bref}_{red}} \right)} \cdot 1000}$$G = {\frac{\left( {{Gr} - {Bref}_{green}} \right)}{\left( {{Wref}_{green} - {Bref}_{green}} \right)} \cdot 1000}$$B = {\frac{\left( {{Br} - {Bref}_{blue}} \right)}{\left( {{Wref}_{blue} - {Bref}_{blue}} \right)} \cdot 1000}$

Other calibration algorithms and/or formulas are however possible withinthe frame of the invention in order to correct the captured raw samplefrom the machine specific variations and/or from variations due toenvironmental conditions, such as for example parasitic light, etc.

In a next step 73, the previously corrected sample colour vector (R,G,B)is compared, for example by the controller 83, to at least one referencecolour vector stored in a look-up table 85 of or accessible to thecontroller 83, and a score representative of the amount of differencebetween the sample colour vector and the at least one reference colourvector is preferably computed.

In embodiments, the look-up table comprises a plurality of referencecolour vector, typically one reference colour vector per known type ofcapsule. The sample colour vector is preferably compared individually toeach reference colour vector of the look-up table 85 and a score iscomputed for each comparison. The reference colour vector which givesfor example the lowest score represents the closest capsule type.Optionally, if the lowest score is above a predefined maximal score MAXSCORE, the comparison step 73 and thus the capsule colour recognitionprocess is considered to have failed and the corresponding capsule isconsidered of an unknown type.

Alternatively, the score is computed such that the reference colourvector which gives the highest score represents the closest capsuletype. Then, optionally, if the highest score is below a predefinedminimal score, the comparison step and thus the capsule colourrecognition process is considered to have failed and the correspondingcapsule is considered of an unknown type.

The score is for example computed by: computing a colour distancebetween the sample colour vector and the reference colour vector;computing a chromaticity distance between a sample chromaticity vectorof the sample colour and a reference chromaticity vector of thereference colour; adding the colour distance and the chromaticitydistance, each distance being optionally weighted by a respective factordepending on the luminosity of the sample colour, as will be explainedfurther below.

Alternatively, the score is for example computed by subtracting from amaximal score value the computed colour distance and the computedchromaticity distance, each possibly weighed by a respective factor.

Other formulas and/or algorithms are however possible within the frameof the invention, in combination with or alternatively from the above,for computing a score representative of the difference between thesample colour and the reference colour from the computed colour andchromaticity distances. The score could for example be computed bymultiplying and/or dividing the computed colour and chromaticitydistances with each other, possibly weighing each of them by specificfactors, etc.

The colour distance is preferably computed as the Euclidian distancebetween the sample colour vector and the reference colour vector. Thecolour distance is thus for example computed according to the followingformula:

DistColour=√{square root over ((R−R _(ref))²+(G−G− _(ref))²+(B−B_(ref))²)},

where (R, G, B) is the sample colour vector and(R_(ref),G_(ref),B_(ref)) is the reference colour vector.

The chromaticity distance is preferably computed as the Euclidiandistance between a sample chromaticity vector of the sample colour and achromaticity reference vector of the reference colour.

Chromaticity vectors are computed according to the following formulas:

${ChrR} = \frac{R}{R + G + B}$ ${ChrG} = \frac{G}{R + G + B}$${ChrB} = \frac{B}{R + G + B}$

for the sample chromaticity vector, and according to the followingformulas:

${ChrR}_{ref} = \frac{R_{ref}}{R_{ref} + G_{ref} + B_{ref}}$${ChrG}_{ref} = \frac{G_{ref}}{R_{ref} + G_{ref} + B_{ref}}$${ChrB}_{ref} = \frac{B_{ref}}{R_{ref} + G_{ref} + B_{ref}}$

for the reference chromaticity vector.

The chromaticity distance is thus for example computed according to thefollowing formula:

${{DistChroma} = \sqrt{\left( {{ChrR} - {ChrR}_{ref}} \right)^{2} + \left( {{ChrG} - {ChrG}_{ref}} \right)^{2} + \left( {{ChrB} - {ChrB}_{ref}} \right)^{2}}},$

where (ChrR,ChrG,ChrB) is the sample chromaticity vector and(ChrR_(ref),ChrG_(ref),ChrB_(ref)) is the reference chromaticity vector.

Other formulas may however be used within the frame of the invention inorder to compute colour and chromaticity distances, depending forexample, but not necessarily, on the number of dimensions of the colourvectors. Manhattan distances or any other appropriate vector distancescould for example be computed.

The chromaticity vectors are not sensitive to luminosity variations ofthe same colour, which may be frequent in the intended normal use of thecolour recognition module of the invention, due for example tovariations in ambient lightning around the beverage preparation machine,variations in the intensity of the source of light 82, etc. Usingchromaticity vectors for comparing colours is thus generally more robustthan using colour vectors.

A problem persists however with capsules of dark colours, where thechromaticity will vary a lot from one measurement to the next due to thegenerally small values of the nominators and the denominators of thefractions in the above formulas. The colour distance will thus generallyprovide more reliable results when comparing dark sample colours.

In embodiments, the colour distance and the chromaticity distance arethus taken into account differently when calculating the score,depending on the luminosity of the colour sample. For example, theweight of the colour distance in the calculated score is more importantthan the weight of the chromaticity distance for dark colours, while theweight of the chromaticity distance is more important than the weight ofthe colour distance for bright colours.

In embodiments, as a result of the comparison step 73, the score is forexample computed from the colour distance and the chromaticity distanceas a weighted sum of said distances according to the formula:

Score=DistColour*BalanceColour+DistChroma*BalanceChroma

where the weighting factors BalanceColour and BalanceChroma are chosendepending on the luminosity of the colour sample calculated as:

Lum=√{square root over (R ² +G ² +B ²)}

which is a value representative of the brightness or darkness of thesample colour.

Specific weighting factors may for example be determined for specificluminosity ranges such as:

If 0<Lum<Th₁, then BalanceColour=Lc and BalanceChroma=LchIf Th₁<Lum<Th₂, then BalanceColour=Mc and BalanceChroma=MchIf Lum>Th₂, then BalanceColour=Hc and BalanceChroma=Hchwhere Th₁ and Th₂ are a first and a second luminosity threshold valuerespectively; and Lc, Lch, Mc, Mch, Hc, Hch are predefined values ofweighting factors for low, medium and high sample colour luminosityrespectively.

Other numbers of luminosity ranges are however possible within the frameof the invention, with respective predefined factors for each range,and/or the weighting factors may be calculated for each comparison stepas a function of the luminosity value of the sample colour. The functionmay for example be linear, exponential, logarithmic, or of any othertype.

Preferably, for the reasons explained above, the BalanceColour weightingfactor is higher for sample colours of low luminosity than it is forsample colours of high luminosity, while the BalanceChroma weightingfactor is lower for sample colours of low luminosity than it is forsample colours of high luminosity.

Experiments have shown for example good results with values of Th₁=70,Th₂=450, Lc=3, Lch=0.25, Mc=0.25, Mch=2.5, Hc=0.25 and Hch=5.

In embodiments, the sample colour is compared in the comparison step 73to each reference colour stored in the lookup table 85 or otherwiseknown to the beverage preparation machine and a score is computed as aresult of each comparison. In a subsequent decision step 74, a decisionabout the type of the capsule is taken on the basis of all computedscore values, the sample colour being deemed to be the reference colourfor which the comparison resulted in the lowest score. The type of thesensed capsule is thus determined to be the type corresponding to saidreference colour. Optionally, if the lowest score is higher than amaximal score, the comparison failed and the capsule is considered asbeing of an unknown type.

Alternatively, in comparison step 73, the sample colour is compared toone reference colour after the other until the resulting score is belowa predefined threshold, or above a predefined threshold in embodimentswhere a high score indicates a match. In a subsequent decision step 74,the sample colour is deemed to be the last compared reference colour,i.e. the first reference colour for which the score was below or abovethe threshold. The type of the sensed capsule is thus determined to bethe type corresponding to said reference colour. If no comparisonresults in a score fulfilling said condition, the comparison failed andthe capsule is considered as being of an unknown type.

The above comparison methods may be combined in that for example thereference colours that lead to a computed score value higher than apredefined threshold are disregarded and then the score values obtainedwith the remaining reference colours are compared to each other in orderto determine the best probable match, corresponding for example to thelowest score value.

The result of the decision step 74, i.e. the determined type of thecapsule, is then preferably transmitted to the control unit of thebeverage preparation machine, which will open the passage 152 to allowthe insertion of the capsule 3 in the extraction chamber 100, andcontrol the various elements of the machine 1, in particular the thermalconditioner 54 and the liquid driver 53, to prepare a beverage 2 usingparameters specifically adapted to the recognised type of capsule.

The raw colour vector correction step 72, the comparison step 73 and thedecision step 74 where described above as being performed essentially bythe controller 83 of the colour recognition module 8. Other calculatorsof the machine 1 may however perform one or more of the above steps. Inparticular, some or all of the above steps may be performed for exampleby the colour sensor 81 and/or by the control unit 40 of the beveragepreparation machine 1.

In embodiments, the result of the colour recognition method is furthercombined with the output of an optional material detector as anadditional criterion to identify a type of capsule, in order for exampleto discriminate between capsules having the same or very similarcolours, but being made of different materials, for example aluminiumand plastic or paper, and possibly containing different ingredientsrequiring different processing by the machine.

1. A machine for preparing and dispensing a beverage comprising: anextraction unit for extracting a beverage ingredient capsule to form thebeverage; a control unit for controlling the extraction unit to extractsuch capsule; an outlet for dispensing the beverage formed by extractingsuch capsule to a user-receptacle; a color recognition module forrecognizing a color of a capsule inserted in the machine, the colorrecognition module comprising a color sensor for sensing a sample colorof at least part of the surface of such capsule; the color recognitionmodule is configured to compare the sample color to at least onereference color by: computing a color distance between a sample colorvector of the sample color and a reference color vector of the at leastone reference color, computing a chromaticity distance between a samplechromaticity vector of the sample color and a reference chromaticityvector of the at least one reference color, computing a score with thecolor distance and the chromaticity distance to determine a matchbetween the color sample and the at least one reference color.
 2. Themachine of claim 1, wherein the color recognition module is configuredto compute the sample chromaticity vector from the sample color vector.3. The machine of claim 1, wherein the sample color vector and thereference color vector are three-dimensional RGB vectors.
 4. The machineof claim 1, wherein the color recognition module is configured tocompute the score by computing a luminosity level of the sample colorand weighting the color distance and the chromaticity distance byrespective balance factors determined on the basis of the luminositylevel.
 5. The machine of claim 1, comprising a capsule recognitionposition with a retaining member for holding the capsule in front of thecolor recognition module.
 6. The machine of claim 1, wherein: the colorrecognition module is configured to compute the color distance bycomputing an Euclidian distance between the sample color vector and thereference color vector; and to compute the chromaticity distance bycomputing an Euclidian distance between the sample chromaticity vectorand the reference chromaticity vector.
 7. The machine of claim 1,wherein the color recognition module is configured to compare the samplecolor to a plurality of reference colors by computing a plurality ofscores for determining a match between the sample color and eachreference color of the plurality of reference colors.
 8. The machine ofclaim 7, wherein the color recognition module is configured to recognizethe capsule based on the reference color of the plurality of referencecolors that best matches the sample color.
 9. The machine of claim 1,wherein the color recognition module is configured to determine a matchbetween the sample color and reference color if the score is below orequal to a threshold value, and to determine no match between the samplecolor and the reference color is the score is above the threshold value.10. The machine of claim 1, comprising a capsule detector for detectingthe presence of a capsule located on or approaching a capsule feeder ofthe machine and triggering color recognition by the color recognitionmodule.
 11. The machine of claim 1, comprising a material detector forrecognising a material of a capsule located on or approaching a capsulefeeder of the machine.
 12. (canceled)
 13. A method of preparing anddispensing a beverage from a capsule, comprising: inserting a capsule inthe machine; sensing a sample color of at least part of the surface ofthe capsule; comparing the sample color to at least one reference colorby: computing a color distance between a sample color vector of thesample color and a reference color vector of the at least one referencecolor; computing a chromaticity distance between a sample chromaticityvector of the sample color and a reference chromaticity vector of the atleast one reference color; computing a score with the color distance andthe chromaticity distance to determine a match between the color sampleand the at least one reference color; recognising a type of the capsulebased on the result of the comparison; relatively moving a first and asecond part of the machine into a distant position; supplying thecapsule to the extracting unit; relatively moving the first and secondparts into a closed position to position the capsule in an extractionchamber; extracting the capsule in the extraction chamber applyingextraction parameters determined on the basis of the recognised type ofthe capsule to prepare a beverage; and dispensing the prepared beveragevia an outlet.
 14. (canceled)